<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of course_model
 *
 * @author Eko Prasetyo<nir@nirleka.web.id>
 */
class item extends CI_Model {

	public function __construct() {
		parent::__construct();
	}

	/**
	 * Mengambil semua data course yang sudah berjalan
	 * @return array of course
	 */
	function get_dropdown_jenis() {
            $q_jenis = $this->db->query('select * from category')->result_array();
            $list_jenis[0] = 'semua jenis';
            for ($i=0;$i<count($q_jenis);$i++){
                $list_jenis[$q_jenis[$i]['ID_CATEGORY']] = $q_jenis[$i]['NAME'];
            }
            return $list_jenis;
        }
	function get_dropdown_kota() {
            $q_kota = $this->db->query('select * from city')->result_array();
            $list_kota[0] = 'semua kota';
            for ($i=0;$i<count($q_kota);$i++){
                $list_kota[$q_kota[$i]['ID_CITY']] = $q_kota[$i]['NAME'];
            }
            return $list_kota;
        }

}

//end of file